package com.mmzsblog.springboot.topic.config;

import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import javax.jms.Topic;

/**
 * @author ：mmzsblog.cn
 * @date ：Created in 2021/11/17 17:01
 * @description：
 * @modified By：
 * @version:
 */

@Component
public class ConfigTopicBean {

    @Value("${topic}")
    private String topicName;

    @Bean
    public Topic topic() {
        return new ActiveMQTopic(topicName);
    }

}
